﻿<UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        mc:Ignorable="d" 
        x:Class="OrganizeYourSearch.StartupPage"
        xmlns:local="clr-namespace:OrganizeYourSearch" d:DesignHeight="450"
    Width="auto" HorizontalAlignment="Stretch">
    <UserControl.Resources>
        <Style x:Key="TabItemFocusVisual">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Rectangle SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="3,3,3,1"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
        <LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFFFD67B" Offset="0"/>
            <GradientStop Color="#FFFDF6F0" Offset="1"/>
        </LinearGradientBrush>
        <SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/>
        <SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/>
        <SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/>
        <SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/>
        <Style TargetType="{x:Type TabItem}">

        <Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
        <Setter Property="Foreground" Value="Black"/>
        <Setter Property="Padding" Value="6,1,6,1"/>
        <Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
        <!--Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/-->
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type TabItem}">
                    <Grid SnapsToDevicePixels="true" Width="105.187" Height="40">
                        <Border x:Name="Bd" Background="{TemplateBinding Background}" 
                                BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,0" 
                                CornerRadius="5,10,0,0" Margin="0" HorizontalAlignment="Left" Width="105.187">
                            <DockPanel x:Name="ContentPanel" HorizontalAlignment="Right" Width="104.938">
                                <ContentPresenter x:Name="Content" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="Header" 
                                        RecognizesAccessKey="True"  HorizontalAlignment="Center" VerticalAlignment="Center" 
                                        Margin="{TemplateBinding Padding}"/>
                            </DockPanel>
                        </Border>
                    </Grid>

                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemHotBackground}"/>
                        </Trigger>
                        <Trigger Property="IsSelected" Value="true">
                            <Setter Property="Panel.ZIndex" Value="1"/>
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemSelectedBackground}"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="false"/>
                                <Condition Property="IsMouseOver" Value="true"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemHotBorderBrush}"/>
                        </MultiTrigger>
                        <Trigger Property="TabStripPlacement" Value="Bottom">
                            <Setter Property="BorderThickness" TargetName="Bd" Value="1,0,1,1"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Left">
                            <Setter Property="BorderThickness" TargetName="Bd" Value="1,1,0,1"/>
                        </Trigger>
                        <Trigger Property="TabStripPlacement" Value="Right">
                            <Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="TabStripPlacement" Value="Top"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-2,-2,-2,-1"/>
                            <Setter Property="Margin" TargetName="ContentPanel" Value="0,0,0,1"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="TabStripPlacement" Value="Bottom"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-2,-1,-2,-2"/>
                            <Setter Property="Margin" TargetName="ContentPanel" Value="0,1,0,0"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="TabStripPlacement" Value="Left"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-2,-2,-1,-2"/>
                            <Setter Property="Margin" TargetName="ContentPanel" Value="0,0,1,0"/>
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsSelected" Value="true"/>
                                <Condition Property="TabStripPlacement" Value="Right"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Margin" Value="-1,-2,-2,-2"/>
                            <Setter Property="Margin" TargetName="ContentPanel" Value="1,0,0,0"/>
                        </MultiTrigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
                            <Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    </UserControl.Resources>
        <DockPanel>
		<Grid Width="300">
			<Button Margin="8,0,7,138.04" x:Name="btnNew" Command="New" Width="245" Height="45.96" VerticalAlignment="Bottom">
				<Grid Height="29.96" Width="184">
					<Image HorizontalAlignment="Left" Margin="0,0,0,-2.04" Source="/OrganizeYourSearch;component/Images/table.ico" Stretch="Fill" Width="32"/>
					<TextBlock TextWrapping="Wrap" Text="New File" Margin="47,0,36,0" FontSize="18.667"/>
				</Grid>
			</Button>
			<Button Margin="8,0,7,88.08" x:Name="btnOpenFile" Command="Open" Height="45.96" VerticalAlignment="Bottom" Width="245">
				<Grid Height="29.96" Width="189">
					<Image HorizontalAlignment="Left" Margin="0,0,0,-2.04" Source="/OrganizeYourSearch;component/Images/table.ico" Stretch="Fill" Width="32"/>
					<TextBlock TextWrapping="Wrap" Text="Open File" Margin="47,0,41,0" FontSize="18.667" RenderTransformOrigin="0.5,0.5"/>
				</Grid>
			</Button>
			<Button Margin="8,0,7,38.12" Height="45.96" VerticalAlignment="Bottom" x:Name="btnOpenBrowser" Command="local:MyCustomCommands.OpenBrowser" Width="245">
				<Grid Height="29.96" Width="191">
					<TextBlock TextWrapping="Wrap" Text="Open Browser" Margin="47,0,8,0" FontSize="18.667"/>
					<Image HorizontalAlignment="Left" Margin="0,0.08,0,1.88" Source="/OrganizeYourSearch;component/Images/WebX32.png" Stretch="Fill" Width="30.5"/>
				</Grid>
			</Button>
		</Grid>
        <Grid DockPanel.Dock="Right" Margin="10,5,10,10">
            <!--TabControl>
                <TabItem x:Name="Recent" Margin="-1.5,0,0,-3.333" Header="Recent" FontSize="18.667" HorizontalAlignment="Left" Width="104.333"/>
                <TabItem x:Name="Favourites" Margin="-3.161,0,0.161,-2.667" Header="Favourites" FontSize="18.667"></TabItem>
            </TabControl-->
            <local:TagCloud></local:TagCloud>
        </Grid>
    </DockPanel>
</UserControl>
